home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / LEDVB25.ZIP / VB.ZIP / LEDTEST.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-30  |  19.6 KB  |  600 lines

  1. VERSION 2.00
  2. Begin Form Examples 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "LED Examples"
  6.    ClientHeight    =   5265
  7.    ClientLeft      =   1440
  8.    ClientTop       =   2145
  9.    ClientWidth     =   6855
  10.    Height          =   5670
  11.    Left            =   1380
  12.    LinkTopic       =   "Form1"
  13.    MDIChild        =   -1  'True
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   351
  16.    ScaleMode       =   3  'Pixel
  17.    ScaleWidth      =   457
  18.    Top             =   1800
  19.    Width           =   6975
  20.    Begin LED LED8 
  21.       AutoRedraw      =   -1  'True
  22.       AutoSize        =   0  ' 0 - None
  23.       AVersion        =   2.5
  24.       BackColor       =   &H00C0C0C0&
  25.       BevelInner      =   0  ' 0 - None
  26.       BevelOuter      =   0  ' 0 - None
  27.       BevelWidth      =   2
  28.       BorderHorizontal=   0
  29.       BorderVertical  =   0
  30.       BorderWidth     =   0
  31.       DecayRate       =   0
  32.       Direction       =   0  ' 0 - Forward
  33.       Height          =   225
  34.       LEDHeight       =   15
  35.       LEDIndex        =   0
  36.       LEDSep          =   3
  37.       LEDStyle        =   2  ' 2 - Bitmap
  38.       LEDWidth        =   30
  39.       Left            =   240
  40.       MaxDecay        =   0   'False
  41.       Mode            =   1  ' 1 - Bitwise
  42.       MouseControl    =   -1  'True
  43.       NumLEDs         =   7
  44.       OffPictureGreen =   LEDTEST.FRX:0000
  45.       OnPictureGreen  =   LEDTEST.FRX:070A
  46.       Orientation     =   0  ' 0 - Horizontal
  47.       TabIndex        =   16
  48.       Top             =   2790
  49.       Value           =   240
  50.       Width           =   3420
  51.       ZLoad           =   LEDTEST.FRX:0914
  52.    End
  53.    Begin LED LED2 
  54.       AutoRedraw      =   -1  'True
  55.       AutoSize        =   0  ' 0 - None
  56.       AVersion        =   2.5
  57.       BackColor       =   &H00C0C0C0&
  58.       BevelInner      =   0  ' 0 - None
  59.       BevelOuter      =   0  ' 0 - None
  60.       BevelWidth      =   3
  61.       BorderHorizontal=   0
  62.       BorderVertical  =   0
  63.       BorderWidth     =   2
  64.       DecayRate       =   0
  65.       Direction       =   0  ' 0 - Forward
  66.       Height          =   360
  67.       LEDHeight       =   20
  68.       LEDIndex        =   0
  69.       LEDSep          =   2
  70.       LEDStyle        =   1  ' 1 - Circular
  71.       LEDWidth        =   20
  72.       Left            =   270
  73.       MaxDecay        =   0   'False
  74.       Mode            =   0  ' 0 - Value
  75.       MouseControl    =   -1  'True
  76.       NumLEDs         =   10
  77.       Orientation     =   0  ' 0 - Horizontal
  78.       TabIndex        =   12
  79.       Top             =   1620
  80.       Value           =   4
  81.       Width           =   3330
  82.       ZLoad           =   LEDTEST.FRX:09DC
  83.    End
  84.    Begin Timer Timer2 
  85.       Interval        =   400
  86.       Left            =   90
  87.       Top             =   660
  88.    End
  89.    Begin LED LED10 
  90.       AutoRedraw      =   -1  'True
  91.       AutoSize        =   0  ' 0 - None
  92.       AVersion        =   2.5
  93.       BackColor       =   &H00C0C0C0&
  94.       BevelInner      =   0  ' 0 - None
  95.       BevelOuter      =   0  ' 0 - None
  96.       BevelWidth      =   2
  97.       BorderHorizontal=   0
  98.       BorderVertical  =   0
  99.       BorderWidth     =   0
  100.       DecayRate       =   0
  101.       Direction       =   0  ' 0 - Forward
  102.       Height          =   450
  103.       LEDHeight       =   30
  104.       LEDIndex        =   0
  105.       LEDSep          =   0
  106.       LEDStyle        =   2  ' 2 - Bitmap
  107.       LEDWidth        =   15
  108.       Left            =   270
  109.       MaxDecay        =   0   'False
  110.       Mode            =   1  ' 1 - Bitwise
  111.       MouseControl    =   0   'False
  112.       NumLEDs         =   15
  113.       OffPictureGreen =   LEDTEST.FRX:0AA4
  114.       OffPictureRed   =   LEDTEST.FRX:0CC2
  115.       OffPictureYellow=   LEDTEST.FRX:0EE0
  116.       OnPictureGreen  =   LEDTEST.FRX:10FE
  117.       OnPictureRed    =   LEDTEST.FRX:131C
  118.       OnPictureYellow =   LEDTEST.FRX:153A
  119.       Orientation     =   0  ' 0 - Horizontal
  120.       TabIndex        =   11
  121.       Top             =   2310
  122.       Value           =   32767
  123.       Width           =   3375
  124.       ZLoad           =   LEDTEST.FRX:1758
  125.    End
  126.    Begin LED LED9 
  127.       AutoRedraw      =   -1  'True
  128.       AutoSize        =   0  ' 0 - None
  129.       AVersion        =   2.5
  130.       BackColor       =   &H00C0C0C0&
  131.       BevelInner      =   0  ' 0 - None
  132.       BevelOuter      =   0  ' 0 - None
  133.       BevelWidth      =   2
  134.       BorderHorizontal=   0
  135.       BorderVertical  =   0
  136.       BorderWidth     =   0
  137.       DecayRate       =   0
  138.       Direction       =   0  ' 0 - Forward
  139.       Height          =   450
  140.       LEDHeight       =   30
  141.       LEDIndex        =   0
  142.       LEDSep          =   0
  143.       LEDStyle        =   2  ' 2 - Bitmap
  144.       LEDWidth        =   15
  145.       Left            =   270
  146.       MaxDecay        =   0   'False
  147.       Mode            =   1  ' 1 - Bitwise
  148.       MouseControl    =   -1  'True
  149.       NumLEDs         =   15
  150.       OffPictureRed   =   LEDTEST.FRX:1820
  151.       OnPictureRed    =   LEDTEST.FRX:1A3E
  152.       Orientation     =   0  ' 0 - Horizontal
  153.       TabIndex        =   10
  154.       Top             =   3030
  155.       Value           =   255
  156.       Width           =   3375
  157.       ZLoad           =   LEDTEST.FRX:1C5C
  158.    End
  159.    Begin LED LED7 
  160.       AutoRedraw      =   -1  'True
  161.       AutoSize        =   0  ' 0 - None
  162.       AVersion        =   2.5
  163.       BackColor       =   &H00C0C0C0&
  164.       BevelInner      =   1  ' 1 - Raised
  165.       BevelOuter      =   2  ' 2 - Inset
  166.       BevelWidth      =   2
  167.       BorderHorizontal=   0
  168.       BorderVertical  =   0
  169.       BorderWidth     =   2
  170.       DecayRate       =   0
  171.       Direction       =   0  ' 0 - Forward
  172.       Height          =   630
  173.       Index           =   3
  174.       LEDHeight       =   30
  175.       LEDIndex        =   0
  176.       LEDSep          =   10
  177.       LEDStyle        =   2  ' 2 - Bitmap
  178.       LEDWidth        =   30
  179.       Left            =   2760
  180.       MaxDecay        =   0   'False
  181.       Mode            =   1  ' 1 - Bitwise
  182.       MouseControl    =   -1  'True
  183.       NumLEDs         =   1
  184.       OffPictureRed   =   LEDTEST.FRX:1D24
  185.       OnPictureRed    =   LEDTEST.FRX:1EEE
  186.       Orientation     =   0  ' 0 - Horizontal
  187.       TabIndex        =   9
  188.       Top             =   330
  189.       Value           =   0
  190.       Width           =   630
  191.       ZLoad           =   LEDTEST.FRX:20B8
  192.    End
  193.    Begin LED LED7 
  194.       AutoRedraw      =   -1  'True
  195.       AutoSize        =   0  ' 0 - None
  196.       AVersion        =   2.5
  197.       BackColor       =   &H00C0C0C0&
  198.       BevelInner      =   0  ' 0 - None
  199.       BevelOuter      =   0  ' 0 - None
  200.       BevelWidth      =   0
  201.       BorderHorizontal=   0
  202.       BorderVertical  =   0
  203.       BorderWidth     =   0
  204.       DecayRate       =   0
  205.       Direction       =   0  ' 0 - Forward
  206.       Height          =   600
  207.       Index           =   2
  208.       LEDHeight       =   40
  209.       LEDIndex        =   0
  210.       LEDSep          =   10
  211.       LEDStyle        =   2  ' 2 - Bitmap
  212.       LEDWidth        =   40
  213.       Left            =   1950
  214.       MaxDecay        =   0   'False
  215.       Mode            =   1  ' 1 - Bitwise
  216.       MouseControl    =   -1  'True
  217.       NumLEDs         =   1
  218.       OffPictureRed   =   LEDTEST.FRX:2180
  219.       OnPictureRed    =   LEDTEST.FRX:24DE
  220.       Orientation     =   0  ' 0 - Horizontal
  221.       TabIndex        =   8
  222.       Top             =   360
  223.       Value           =   0
  224.       Width           =   600
  225.       ZLoad           =   LEDTEST.FRX:283C
  226.    End
  227.    Begin LED LED7 
  228.       AutoRedraw      =   -1  'True
  229.       AutoSize        =   0  ' 0 - None
  230.       AVersion        =   2.5
  231.       BackColor       =   &H00C0C0C0&
  232.       BevelInner      =   2  ' 2 - Inset
  233.       BevelOuter      =   1  ' 1 - Raised
  234.       BevelWidth      =   2
  235.       BorderHorizontal=   5
  236.       BorderVertical  =   5
  237.       BorderWidth     =   2
  238.       DecayRate       =   0
  239.       Direction       =   0  ' 0 - Forward
  240.       Height          =   630
  241.       Index           =   1
  242.       LEDHeight       =   20
  243.       LEDIndex        =   0
  244.       LEDSep          =   10
  245.       LEDStyle        =   1  ' 1 - Circular
  246.       LEDWidth        =   20
  247.       Left            =   1170
  248.       MaxDecay        =   0   'False
  249.       Mode            =   1  ' 1 - Bitwise
  250.       MouseControl    =   -1  'True
  251.       NumLEDs         =   1
  252.       Orientation     =   0  ' 0 - Horizontal
  253.       TabIndex        =   7
  254.       Top             =   330
  255.       Value           =   0
  256.       Width           =   630
  257.       ZLoad           =   LEDTEST.FRX:2904
  258.    End
  259.    Begin LED LED7 
  260.       AutoRedraw      =   -1  'True
  261.       AutoSize        =   0  ' 0 - None
  262.       AVersion        =   2.5
  263.       BackColor       =   &H00C0C0C0&
  264.       BevelInner      =   2  ' 2 - Inset
  265.       BevelOuter      =   2  ' 2 - Inset
  266.       BevelWidth      =   2
  267.       BorderHorizontal=   5
  268.       BorderVertical  =   5
  269.       BorderWidth     =   2
  270.       DecayRate       =   0
  271.       Direction       =   0  ' 0 - Forward
  272.       Height          =   630
  273.       Index           =   0
  274.       LEDHeight       =   20
  275.       LEDIndex        =   0
  276.       LEDSep          =   10
  277.       LEDStyle        =   0  ' 0 - Rectangular
  278.       LEDWidth        =   20
  279.       Left            =   390
  280.       MaxDecay        =   0   'False
  281.       Mode            =   1  ' 1 - Bitwise
  282.       MouseControl    =   -1  'True
  283.       NumLEDs         =   1
  284.       Orientation     =   0  ' 0 - Horizontal
  285.       TabIndex        =   6
  286.       Top             =   330
  287.       Value           =   0
  288.       Width           =   630
  289.       ZLoad           =   LEDTEST.FRX:29CC
  290.    End
  291.    Begin LED LED4 
  292.       AutoRedraw      =   -1  'True
  293.       AutoSize        =   0  ' 0 - None
  294.       AVersion        =   2.5
  295.       BackColor       =   &H00C0C0C0&
  296.       BevelInner      =   0  ' 0 - None
  297.       BevelOuter      =   0  ' 0 - None
  298.       BevelWidth      =   3
  299.       BorderHorizontal=   0
  300.       BorderVertical  =   0
  301.       BorderWidth     =   2
  302.       DecayRate       =   0
  303.       Direction       =   1  ' 1 - Backward
  304.       Height          =   360
  305.       LEDHeight       =   20
  306.       LEDIndex        =   0
  307.       LEDSep          =   2
  308.       LEDStyle        =   0  ' 0 - Rectangular
  309.       LEDWidth        =   20
  310.       Left            =   270
  311.       MaxDecay        =   0   'False
  312.       Mode            =   0  ' 0 - Value
  313.       MouseControl    =   -1  'True
  314.       NumLEDs         =   10
  315.       Orientation     =   0  ' 0 - Horizontal
  316.       TabIndex        =   5
  317.       Top             =   1260
  318.       Value           =   4
  319.       Width           =   3330
  320.       ZLoad           =   LEDTEST.FRX:2A94
  321.    End
  322.    Begin LED LED6 
  323.       AutoRedraw      =   -1  'True
  324.       AutoSize        =   0  ' 0 - None
  325.       AVersion        =   2.5
  326.       BackColor       =   &H00C0C0C0&
  327.       BevelInner      =   1  ' 1 - Raised
  328.       BevelOuter      =   2  ' 2 - Inset
  329.       BevelWidth      =   1
  330.       BorderHorizontal=   13
  331.       BorderVertical  =   4
  332.       BorderWidth     =   0
  333.       DecayRate       =   0
  334.       Direction       =   0  ' 0 - Forward
  335.       Height          =   780
  336.       LEDHeight       =   40
  337.       LEDIndex        =   0
  338.       LEDSep          =   0
  339.       LEDStyle        =   2  ' 2 - Bitmap
  340.       LEDWidth        =   20
  341.       Left            =   930
  342.       MaxDecay        =   0   'False
  343.       Mode            =   1  ' 1 - Bitwise
  344.       MouseControl    =   -1  'True
  345.       NumLEDs         =   16
  346.       OffPictureRed   =   LEDTEST.FRX:2B5C
  347.       OnPictureRed    =   LEDTEST.FRX:2DB6
  348.       Orientation     =   0  ' 0 - Horizontal
  349.       TabIndex        =   4
  350.       Top             =   4350
  351.       Value           =   9876
  352.       Width           =   5250
  353.       ZLoad           =   LEDTEST.FRX:3010
  354.    End
  355.    Begin Frame Frame4 
  356.       BackColor       =   &H00C0C0C0&
  357.       Caption         =   "Max Decay Ex."
  358.       Height          =   3405
  359.       Left            =   4950
  360.       TabIndex        =   2
  361.       Top             =   60
  362.       Width           =   1695
  363.       Begin LED LED5 
  364.          AutoRedraw      =   -1  'True
  365.          AutoSize        =   0  ' 0 - None
  366.          AVersion        =   2.5
  367.          BackColor       =   &H00C0C0C0&
  368.          BevelInner      =   0  ' 0 - None
  369.          BevelOuter      =   0  ' 0 - None
  370.          BevelWidth      =   2
  371.          BorderHorizontal=   2
  372.          BorderVertical  =   2
  373.          BorderWidth     =   2
  374.          DecayRate       =   100
  375.          Direction       =   1  ' 1 - Backward
  376.          Height          =   3000
  377.          Index           =   3
  378.          LEDHeight       =   6
  379.          LEDIndex        =   0
  380.          LEDSep          =   0
  381.          LEDStyle        =   0  ' 0 - Rectangular
  382.          LEDWidth        =   15
  383.          Left            =   1140
  384.          MaxDecay        =   -1  'True
  385.          Mode            =   0  ' 0 - Value
  386.          MouseControl    =   0   'False
  387.          NumLEDs         =   32
  388.          Orientation     =   1  ' 1 - Vertical
  389.          TabIndex        =   15
  390.          Top             =   300
  391.          Value           =   0
  392.          Width           =   345
  393.          ZLoad           =   LEDTEST.FRX:30D8
  394.       End
  395.       Begin LED LED5 
  396.          AutoRedraw      =   -1  'True
  397.          AutoSize        =   0  ' 0 - None
  398.          AVersion        =   2.5
  399.          BackColor       =   &H00C0C0C0&
  400.          BevelInner      =   0  ' 0 - None
  401.          BevelOuter      =   0  ' 0 - None
  402.          BevelWidth      =   2
  403.          BorderHorizontal=   2
  404.          BorderVertical  =   2
  405.          BorderWidth     =   2
  406.          DecayRate       =   100
  407.          Direction       =   1  ' 1 - Backward
  408.          Height          =   3000
  409.          Index           =   2
  410.          LEDHeight       =   6
  411.          LEDIndex        =   0
  412.          LEDSep          =   0
  413.          LEDStyle        =   0  ' 0 - Rectangular
  414.          LEDWidth        =   15
  415.          Left            =   840
  416.          MaxDecay        =   -1  'True
  417.          Mode            =   0  ' 0 - Value
  418.          MouseControl    =   0   'False
  419.          NumLEDs         =   32
  420.          Orientation     =   1  ' 1 - Vertical
  421.          TabIndex        =   14
  422.          Top             =   300
  423.          Value           =   0
  424.          Width           =   345
  425.          ZLoad           =   LEDTEST.FRX:31A0
  426.       End
  427.       Begin LED LED5 
  428.          AutoRedraw      =   -1  'True
  429.          AutoSize        =   0  ' 0 - None
  430.          AVersion        =   2.5
  431.          BackColor       =   &H00C0C0C0&
  432.          BevelInner      =   0  ' 0 - None
  433.          BevelOuter      =   0  ' 0 - None
  434.          BevelWidth      =   2
  435.          BorderHorizontal=   2
  436.          BorderVertical  =   2
  437.          BorderWidth     =   2
  438.          DecayRate       =   100
  439.          Direction       =   1  ' 1 - Backward
  440.          Height          =   3000
  441.          Index           =   1
  442.          LEDHeight       =   6
  443.          LEDIndex        =   0
  444.          LEDSep          =   0
  445.          LEDStyle        =   0  ' 0 - Rectangular
  446.          LEDWidth        =   15
  447.          Left            =   540
  448.          MaxDecay        =   -1  'True
  449.          Mode            =   0  ' 0 - Value
  450.          MouseControl    =   0   'False
  451.          NumLEDs         =   32
  452.          Orientation     =   1  ' 1 - Vertical
  453.          TabIndex        =   13
  454.          Top             =   300
  455.          Value           =   0
  456.          Width           =   345
  457.          ZLoad           =   LEDTEST.FRX:3268
  458.       End
  459.       Begin LED LED5 
  460.          AutoRedraw      =   -1  'True
  461.          AutoSize        =   0  ' 0 - None
  462.          AVersion        =   2.5
  463.          BackColor       =   &H00C0C0C0&
  464.          BevelInner      =   0  ' 0 - None
  465.          BevelOuter      =   0  ' 0 - None
  466.          BevelWidth      =   2
  467.          BorderHorizontal=   2
  468.          BorderVertical  =   2
  469.          BorderWidth     =   2
  470.          DecayRate       =   100
  471.          Direction       =   1  ' 1 - Backward
  472.          Height          =   3000
  473.          Index           =   0
  474.          LEDHeight       =   6
  475.          LEDIndex        =   0
  476.          LEDSep          =   0
  477.          LEDStyle        =   0  ' 0 - Rectangular
  478.          LEDWidth        =   15
  479.          Left            =   240
  480.          MaxDecay        =   -1  'True
  481.          Mode            =   0  ' 0 - Value
  482.          MouseControl    =   0   'False
  483.          NumLEDs         =   32
  484.          Orientation     =   1  ' 1 - Vertical
  485.          TabIndex        =   3
  486.          Top             =   300
  487.          Value           =   0
  488.          Width           =   345
  489.          ZLoad           =   LEDTEST.FRX:3330
  490.       End
  491.    End
  492.    Begin Timer Timer1 
  493.       Interval        =   150
  494.       Left            =   90
  495.       Top             =   180
  496.    End
  497.    Begin LED LED3 
  498.       AutoRedraw      =   -1  'True
  499.       AutoSize        =   0  ' 0 - None
  500.       AVersion        =   2.5
  501.       BackColor       =   &H00C0C0C0&
  502.       BevelInner      =   0  ' 0 - None
  503.       BevelOuter      =   2  ' 2 - Inset
  504.       BevelWidth      =   2
  505.       BorderHorizontal=   0
  506.       BorderVertical  =   2
  507.       BorderWidth     =   0
  508.       DecayRate       =   60
  509.       Direction       =   0  ' 0 - Forward
  510.       Height          =   510
  511.       LEDHeight       =   26
  512.       LEDIndex        =   0
  513.       LEDSep          =   0
  514.       LEDStyle        =   2  ' 2 - Bitmap
  515.       LEDWidth        =   23
  516.       Left            =   930
  517.       MaxDecay        =   -1  'True
  518.       Mode            =   0  ' 0 - Value
  519.       MouseControl    =   -1  'True
  520.       NumLEDs         =   15
  521.       OffPictureGreen =   LEDTEST.FRX:33F8
  522.       OffPictureRed   =   LEDTEST.FRX:35C2
  523.       OffPictureYellow=   LEDTEST.FRX:378C
  524.       OnPictureGreen  =   LEDTEST.FRX:3956
  525.       OnPictureRed    =   LEDTEST.FRX:3B20
  526.       OnPictureYellow =   LEDTEST.FRX:3CEA
  527.       Orientation     =   0  ' 0 - Horizontal
  528.       TabIndex        =   1
  529.       Top             =   3720
  530.       Value           =   20
  531.       Width           =   5235
  532.       ZLoad           =   LEDTEST.FRX:3EB4
  533.    End
  534.    Begin LED LED1 
  535.       AutoRedraw      =   -1  'True
  536.       AutoSize        =   0  ' 0 - None
  537.       AVersion        =   2.5
  538.       BackColor       =   &H00C0C0C0&
  539.       BackgroundPicture=   LEDTEST.FRX:3F7C
  540.       BevelInner      =   0  ' 0 - None
  541.       BevelOuter      =   0  ' 0 - None
  542.       BevelWidth      =   0
  543.       BorderHorizontal=   18
  544.       BorderVertical  =   0
  545.       BorderWidth     =   3
  546.       DecayRate       =   30
  547.       Direction       =   1  ' 1 - Backward
  548.       Height          =   3348
  549.       LEDHeight       =   12
  550.       LEDIndex        =   0
  551.       LEDSep          =   0
  552.       LEDStyle        =   0  ' 0 - Rectangular
  553.       LEDWidth        =   9
  554.       Left            =   3960
  555.       MaxDecay        =   0   'False
  556.       Mode            =   0  ' 0 - Value
  557.       MouseControl    =   -1  'True
  558.       NumLEDs         =   15
  559.       Orientation     =   1  ' 1 - Vertical
  560.       TabIndex        =   0
  561.       Top             =   120
  562.       Value           =   7
  563.       Width           =   732
  564.       ZLoad           =   LEDTEST.FRX:4E42
  565.    End
  566.    Begin Label Label1 
  567.       BackStyle       =   0  'Transparent
  568.       Caption         =   "Try clicking or sliding the LEDs"
  569.       Height          =   195
  570.       Left            =   450
  571.       TabIndex        =   17
  572.       Top             =   30
  573.       Width           =   2715
  574.    End
  575. Dim theta(5) As Single
  576. Dim rates(5) As Single
  577. Sub Form_Load ()
  578.     Randomize
  579.     For i = 0 To 4
  580.         theta(i) = Rnd(1) * 3.14159
  581.         rates(i) = .2 * Rnd(1)
  582.     Next
  583. End Sub
  584. Sub LED2_Click ()
  585.     led4 = led2
  586. End Sub
  587. Sub LED4_Click ()
  588.     led2 = led4
  589. End Sub
  590. Sub Timer1_Timer ()
  591.     For i = 0 To 3
  592.         Randomize
  593.         led5(i) = 32 * Sin(theta(i)) ^ 2
  594.         theta(i) = theta(i) + rates(i)
  595.     Next
  596. End Sub
  597. Sub Timer2_Timer ()
  598.     led10 = Rnd(1) * 32767
  599. End Sub
  600.